package com.example.android.story.Utils;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;

import cn.bmob.v3.BmobObject;

/**
 * Created by android on 18-5-21.
 */

@Entity(
        tableName = "_actor"
)
public class Actor {

    @NonNull
    @PrimaryKey
    @ColumnInfo(name = "actor_name")
    private String name;

    private String bundle;

    private String picture;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getBundle() {
        return bundle;
    }

    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

    public BmobObject getBmobObject(){
        ActorObj obj=new ActorObj();
        obj.setBundle(this.getBundle());
        obj.setName(this.getName());
        obj.setPicture(this.getPicture());
        return obj;
    }

    public class ActorObj extends BmobObject{
        private String name;
        private String bundle;
        private String picture;

        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getBundle() {
            return bundle;
        }
        public void setBundle(String bundle) {
            this.bundle = bundle;
        }
        public String getPicture() {
            return picture;
        }
        public void setPicture(String picture) {
            this.picture = picture;
        }
    }
}
